package com.dnb.webmash.playmaker.client.playertypes;

import com.dnb.webmash.playmaker.client.mediaplayer.MediaPlayer;
import com.dnb.webmash.playmaker.shared.PlayerType;
import com.google.gwt.dom.client.Document;

//universal iframe media embedder
public class ScriptPlayer extends MediaPlayer{
	public ScriptPlayer() {
		myType = PlayerType.SCRIPT;
		setElement(Document.get().createDivElement());
		myElement = Document.get().createScriptElement();
		myElement.setAttribute("type", "text/javascript");
				
	}		
	@Override
	protected void embed() {			
		myElement.setAttribute("src", mediaIt.getElement());
		getElement().appendChild(myElement);
	}
}
